







Algorithms..::FirstIndexOfMany<(Of <T>)> Method (IList<(Of <T>)>, IEnumerable<(Of <T>)>, IEqualityComparer<(Of <T>)>) |
See Also |
![]() ![]() |
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Finds the index of the first item in a list equal to one of several given items. A passed
IEqualityComparer is used to determine equality.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static int FirstIndexOfMany<T>( IList<T> list, IEnumerable<T> itemsToLookFor, IEqualityComparer<T> equalityComparer ) |
Visual Basic (Declaration) |
---|
Public Shared Function FirstIndexOfMany(Of T) ( _ list As IList(Of T), _ itemsToLookFor As IEnumerable(Of T), _ equalityComparer As IEqualityComparer(Of T) _ ) As Integer |
Visual C++ |
---|
public: generic<typename T> static int FirstIndexOfMany ( IList<T>^ list, IEnumerable<T>^ itemsToLookFor, IEqualityComparer<T>^ equalityComparer ) |
Parameters
- list
- IList<(Of <T>)>
The list to search.
- itemsToLookFor
- IEnumerable<(Of <T>)>
The items to search for.
- equalityComparer
- IEqualityComparer<(Of <T>)>
The IEqualityComparer<T> used to compare items for equality. Only the Equals and GetHashCode methods will be called.
Return Value
The index of the first item equal to any of the items in the collection itemsToLookFor. -1 if no such item exists in the list.
Type Parameters
- T
See Also
Algorithms Class
Wintellect.PowerCollections Namespace